<template>
    <div class="index">
        <p class="search" @click="goSearch"><van-icon name="search" size="20" color="#333"/></p>
        <div>
            <van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
                <van-swipe-item><img src="@/assets/pic1.jpg" alt=""></van-swipe-item>
                <van-swipe-item><img src="@/assets/pic2.jpg" alt=""></van-swipe-item>
                <van-swipe-item><img src="@/assets/pic3.jpeg" alt=""></van-swipe-item>
                <van-swipe-item><img src="@/assets/pic4.jpg" alt=""></van-swipe-item>
            </van-swipe>
        </div>
        <van-grid :border="false" :column-num="4">
            <van-grid-item>
                <van-icon name="like" size='30' color="pink"/>
                <span class="title">省心</span>
            </van-grid-item>
            <van-grid-item>
                <van-icon name="gift-o" size='30' color="pink"/>
                <span class="title">品质</span>
            </van-grid-item>
            <van-grid-item>
                <van-icon name="thumb-circle-o" size='30' color="pink"/>
                <span class="title">私密</span>
            </van-grid-item>
            <van-grid-item>
                <van-icon name="flower-o" size='30' color="pink"/>
                <span class="title">专享</span>
            </van-grid-item>
        </van-grid>
        <p class="recommend">推荐<van-icon name="arrow-down" /></p>
        <Totalone></Totalone>
        <Totaltwo></Totaltwo>
        <p class="recommend">猜你喜欢<van-icon name="arrow-down" /></p>
        <Totalthree></Totalthree>
    </div>
</template>

<script>
import Vue from 'vue';
import { Swipe, SwipeItem,Grid,GridItem,Icon} from 'vant';

Vue.use(Swipe);
Vue.use(SwipeItem);
Vue.use(Grid);
Vue.use(GridItem);
Vue.use(Icon);
import Totalone from '@/components/content/indOne'
import Totaltwo from '@/components/content/indTwo'
import Totalthree from '@/components/content/indThree'
export default {
    data() {
        return {
        };
    },

    components: {
        Totalone,
        Totaltwo,
        Totalthree
    },

    computed: {},

    created() {
        
    },

    mounted() {},

    methods: {
        goSearch(){
            this.$router.push('/search')
        }
    },
};
</script>
<style scoped>
.index{
    margin-bottom:50px;
    background: #f2f2f2;
}
.search{
    width:2rem;
    line-height:1.5rem;
    position:fixed;
    top:2.5%;
    left:5%;
    text-align:center;
    border:1px solid #ccc;
    z-index:999;
    background: #ccc;
    border-radius: 50%;
}
.van-icon-search{
    padding-top:0.5rem;
}
.my-swipe .van-swipe-item {
    color: #fff;
    font-size: 20px;
    text-align: center;
}
.my-swipe .van-swipe-item img{
    width:100%;
    height:200px;
}
.title{
    font-size:12px;
    line-height:30px;
    color:pink;
}
.recommend{
    margin-top:10px;
    line-height:40px;
    width:100%;
    font-size:14px;
    text-align:center;
    border-bottom:1px solid #666;
    background: white;
}
</style>